3.353 \(\int (a+b x)^n \left (c+d x^2\right ) \, dx\)

Optimal. Leaf size=70 \[ \frac{\left (a^2 d+b^2 c\right ) (a+b x)^{n+1}}{b^3 (n+1)}-\frac{2 a d (a+b x)^{n+2}}{b^3 (n+2)}+\frac{d (a+b x)^{n+3}}{b^3 (n+3)} \]

[Out]

((b^2*c + a^2*d)*(a + b*x)^(1 + n))/(b^3*(1 + n)) - (2*a*d*(a + b*x)^(2 + n))/(b
^3*(2 + n)) + (d*(a + b*x)^(3 + n))/(b^3*(3 + n))

_______________________________________________________________________________________

Rubi [A]  time = 0.0678415, antiderivative size = 70, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 1, integrand size = 15, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.067 \[ \frac{\left (a^2 d+b^2 c\right ) (a+b x)^{n+1}}{b^3 (n+1)}-\frac{2 a d (a+b x)^{n+2}}{b^3 (n+2)}+\frac{d (a+b x)^{n+3}}{b^3 (n+3)} \]

Antiderivative was successfully verified.

[In]  Int[(a + b*x)^n*(c + d*x^2),x]

[Out]

((b^2*c + a^2*d)*(a + b*x)^(1 + n))/(b^3*(1 + n)) - (2*a*d*(a + b*x)^(2 + n))/(b
^3*(2 + n)) + (d*(a + b*x)^(3 + n))/(b^3*(3 + n))

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 16.1489, size = 61, normalized size = 0.87 \[ - \frac{2 a d \left (a + b x\right )^{n + 2}}{b^{3} \left (n + 2\right )} + \frac{d \left (a + b x\right )^{n + 3}}{b^{3} \left (n + 3\right )} + \frac{\left (a + b x\right )^{n + 1} \left (a^{2} d + b^{2} c\right )}{b^{3} \left (n + 1\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate((b*x+a)**n*(d*x**2+c),x)

[Out]

-2*a*d*(a + b*x)**(n + 2)/(b**3*(n + 2)) + d*(a + b*x)**(n + 3)/(b**3*(n + 3)) +
 (a + b*x)**(n + 1)*(a**2*d + b**2*c)/(b**3*(n + 1))

_______________________________________________________________________________________

Mathematica [A]  time = 0.0619951, size = 65, normalized size = 0.93 \[ \frac{(a+b x)^{n+1} \left (2 a^2 d-2 a b d (n+1) x+b^2 (n+2) \left (c (n+3)+d (n+1) x^2\right )\right )}{b^3 (n+1) (n+2) (n+3)} \]

Antiderivative was successfully verified.

[In]  Integrate[(a + b*x)^n*(c + d*x^2),x]

[Out]

((a + b*x)^(1 + n)*(2*a^2*d - 2*a*b*d*(1 + n)*x + b^2*(2 + n)*(c*(3 + n) + d*(1
+ n)*x^2)))/(b^3*(1 + n)*(2 + n)*(3 + n))

_______________________________________________________________________________________

Maple [A]  time = 0.006, size = 100, normalized size = 1.4 \[{\frac{ \left ( bx+a \right ) ^{1+n} \left ({b}^{2}d{n}^{2}{x}^{2}+3\,{b}^{2}dn{x}^{2}-2\,abdnx+{b}^{2}c{n}^{2}+2\,d{x}^{2}{b}^{2}-2\,adxb+5\,{b}^{2}cn+2\,{a}^{2}d+6\,{b}^{2}c \right ) }{{b}^{3} \left ({n}^{3}+6\,{n}^{2}+11\,n+6 \right ) }} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int((b*x+a)^n*(d*x^2+c),x)

[Out]

(b*x+a)^(1+n)*(b^2*d*n^2*x^2+3*b^2*d*n*x^2-2*a*b*d*n*x+b^2*c*n^2+2*b^2*d*x^2-2*a
*b*d*x+5*b^2*c*n+2*a^2*d+6*b^2*c)/b^3/(n^3+6*n^2+11*n+6)

_______________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \[ \text{Exception raised: ValueError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((d*x^2 + c)*(b*x + a)^n,x, algorithm="maxima")

[Out]

Exception raised: ValueError

_______________________________________________________________________________________

Fricas [A]  time = 0.278955, size = 200, normalized size = 2.86 \[ \frac{{\left (a b^{2} c n^{2} + 5 \, a b^{2} c n + 6 \, a b^{2} c + 2 \, a^{3} d +{\left (b^{3} d n^{2} + 3 \, b^{3} d n + 2 \, b^{3} d\right )} x^{3} +{\left (a b^{2} d n^{2} + a b^{2} d n\right )} x^{2} +{\left (b^{3} c n^{2} + 6 \, b^{3} c +{\left (5 \, b^{3} c - 2 \, a^{2} b d\right )} n\right )} x\right )}{\left (b x + a\right )}^{n}}{b^{3} n^{3} + 6 \, b^{3} n^{2} + 11 \, b^{3} n + 6 \, b^{3}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((d*x^2 + c)*(b*x + a)^n,x, algorithm="fricas")

[Out]

(a*b^2*c*n^2 + 5*a*b^2*c*n + 6*a*b^2*c + 2*a^3*d + (b^3*d*n^2 + 3*b^3*d*n + 2*b^
3*d)*x^3 + (a*b^2*d*n^2 + a*b^2*d*n)*x^2 + (b^3*c*n^2 + 6*b^3*c + (5*b^3*c - 2*a
^2*b*d)*n)*x)*(b*x + a)^n/(b^3*n^3 + 6*b^3*n^2 + 11*b^3*n + 6*b^3)

_______________________________________________________________________________________

Sympy [A]  time = 4.31287, size = 978, normalized size = 13.97 \[ \text{result too large to display} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((b*x+a)**n*(d*x**2+c),x)

[Out]

Piecewise((a**n*(c*x + d*x**3/3), Eq(b, 0)), (2*a**2*d*log(a/b + x)/(2*a**2*b**3
 + 4*a*b**4*x + 2*b**5*x**2) + a**2*d/(2*a**2*b**3 + 4*a*b**4*x + 2*b**5*x**2) +
 4*a*b*d*x*log(a/b + x)/(2*a**2*b**3 + 4*a*b**4*x + 2*b**5*x**2) - b**2*c/(2*a**
2*b**3 + 4*a*b**4*x + 2*b**5*x**2) + 2*b**2*d*x**2*log(a/b + x)/(2*a**2*b**3 + 4
*a*b**4*x + 2*b**5*x**2) - 2*b**2*d*x**2/(2*a**2*b**3 + 4*a*b**4*x + 2*b**5*x**2
), Eq(n, -3)), (-2*a**3*d*log(a/b + x)/(a**2*b**3 + a*b**4*x) - 2*a**2*b*d*x*log
(a/b + x)/(a**2*b**3 + a*b**4*x) + 2*a**2*b*d*x/(a**2*b**3 + a*b**4*x) + a*b**2*
d*x**2/(a**2*b**3 + a*b**4*x) + b**3*c*x/(a**2*b**3 + a*b**4*x), Eq(n, -2)), (a*
*2*d*log(a/b + x)/b**3 - a*d*x/b**2 + c*log(a/b + x)/b + d*x**2/(2*b), Eq(n, -1)
), (2*a**3*d*(a + b*x)**n/(b**3*n**3 + 6*b**3*n**2 + 11*b**3*n + 6*b**3) - 2*a**
2*b*d*n*x*(a + b*x)**n/(b**3*n**3 + 6*b**3*n**2 + 11*b**3*n + 6*b**3) + a*b**2*c
*n**2*(a + b*x)**n/(b**3*n**3 + 6*b**3*n**2 + 11*b**3*n + 6*b**3) + 5*a*b**2*c*n
*(a + b*x)**n/(b**3*n**3 + 6*b**3*n**2 + 11*b**3*n + 6*b**3) + 6*a*b**2*c*(a + b
*x)**n/(b**3*n**3 + 6*b**3*n**2 + 11*b**3*n + 6*b**3) + a*b**2*d*n**2*x**2*(a +
b*x)**n/(b**3*n**3 + 6*b**3*n**2 + 11*b**3*n + 6*b**3) + a*b**2*d*n*x**2*(a + b*
x)**n/(b**3*n**3 + 6*b**3*n**2 + 11*b**3*n + 6*b**3) + b**3*c*n**2*x*(a + b*x)**
n/(b**3*n**3 + 6*b**3*n**2 + 11*b**3*n + 6*b**3) + 5*b**3*c*n*x*(a + b*x)**n/(b*
*3*n**3 + 6*b**3*n**2 + 11*b**3*n + 6*b**3) + 6*b**3*c*x*(a + b*x)**n/(b**3*n**3
 + 6*b**3*n**2 + 11*b**3*n + 6*b**3) + b**3*d*n**2*x**3*(a + b*x)**n/(b**3*n**3
+ 6*b**3*n**2 + 11*b**3*n + 6*b**3) + 3*b**3*d*n*x**3*(a + b*x)**n/(b**3*n**3 +
6*b**3*n**2 + 11*b**3*n + 6*b**3) + 2*b**3*d*x**3*(a + b*x)**n/(b**3*n**3 + 6*b*
*3*n**2 + 11*b**3*n + 6*b**3), True))

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.265267, size = 355, normalized size = 5.07 \[ \frac{b^{3} d n^{2} x^{3} e^{\left (n{\rm ln}\left (b x + a\right )\right )} + a b^{2} d n^{2} x^{2} e^{\left (n{\rm ln}\left (b x + a\right )\right )} + 3 \, b^{3} d n x^{3} e^{\left (n{\rm ln}\left (b x + a\right )\right )} + b^{3} c n^{2} x e^{\left (n{\rm ln}\left (b x + a\right )\right )} + a b^{2} d n x^{2} e^{\left (n{\rm ln}\left (b x + a\right )\right )} + 2 \, b^{3} d x^{3} e^{\left (n{\rm ln}\left (b x + a\right )\right )} + a b^{2} c n^{2} e^{\left (n{\rm ln}\left (b x + a\right )\right )} + 5 \, b^{3} c n x e^{\left (n{\rm ln}\left (b x + a\right )\right )} - 2 \, a^{2} b d n x e^{\left (n{\rm ln}\left (b x + a\right )\right )} + 5 \, a b^{2} c n e^{\left (n{\rm ln}\left (b x + a\right )\right )} + 6 \, b^{3} c x e^{\left (n{\rm ln}\left (b x + a\right )\right )} + 6 \, a b^{2} c e^{\left (n{\rm ln}\left (b x + a\right )\right )} + 2 \, a^{3} d e^{\left (n{\rm ln}\left (b x + a\right )\right )}}{b^{3} n^{3} + 6 \, b^{3} n^{2} + 11 \, b^{3} n + 6 \, b^{3}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((d*x^2 + c)*(b*x + a)^n,x, algorithm="giac")

[Out]

(b^3*d*n^2*x^3*e^(n*ln(b*x + a)) + a*b^2*d*n^2*x^2*e^(n*ln(b*x + a)) + 3*b^3*d*n
*x^3*e^(n*ln(b*x + a)) + b^3*c*n^2*x*e^(n*ln(b*x + a)) + a*b^2*d*n*x^2*e^(n*ln(b
*x + a)) + 2*b^3*d*x^3*e^(n*ln(b*x + a)) + a*b^2*c*n^2*e^(n*ln(b*x + a)) + 5*b^3
*c*n*x*e^(n*ln(b*x + a)) - 2*a^2*b*d*n*x*e^(n*ln(b*x + a)) + 5*a*b^2*c*n*e^(n*ln
(b*x + a)) + 6*b^3*c*x*e^(n*ln(b*x + a)) + 6*a*b^2*c*e^(n*ln(b*x + a)) + 2*a^3*d
*e^(n*ln(b*x + a)))/(b^3*n^3 + 6*b^3*n^2 + 11*b^3*n + 6*b^3)